<template>
  <div>
    <el-menu
      active-text-color="#ffd04b" text-color="#fff" background-color="#001529"
      unique-opened router collapse-transition>
      <el-submenu :index="item.index" v-for="item of navbarlist" :key="item.index" v-show="item.show">
        <template slot="title">
          <i class="iconfont" :class="item.icon"></i>
          <span>{{item.management}}</span>
        </template>
        <el-menu-item v-for="y of item.subnavlist" :index="y.index" :key="y.index">{{y.management}}</el-menu-item>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
  export default {
    name: "SlideBar",
    props: {
      navbarlist: Array
    },
    methods: {
      handleOpen(index) {
        console.log(index);
      }
    }
  }
</script>

<style lang="less" scoped>
  .iconfont {
    padding-right: 30px;
  }
  .link {
    color: #fff;
  }
</style>
